package com.direct.ratelimit.action;

import com.direct.ratelimit.threshold.Threshold;

/**
 * when a {@link Threshold} has been exceeded this is what action should be
 * taken.
 * 
 * @author shaun
 * 
 */
public interface Action {

	/**
	 * should this action execute. a few examples of when the action should not
	 * execute is when. <br>
	 * the action for this threshold has already been executed earlier <br>
	 * configuration has disabled this action <br>
	 * somthing else
	 * 
	 * @return
	 */
	boolean shouldExecute();

	/**
	 * perform the action TODO figure out if we need to come up with a
	 * standardized response
	 */
	void execute();

}
